#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int main()
{
	int arr[10][10];
	int i = 0;
	int j = 0;
	for (i = 0; i < 10; i++)
	{
		arr[i][1] = 1;
		for (j = 2; j <= i; j++)
		{
			if (i == j)
				arr[i][j] = 1;
			else
				arr[i][j] = arr[i - 1][j] + arr[i - 1][j - 1];
		}
	}
	for (i = 0; i < 10; i++)
	{
		for (j = 1; j <= i; j++)
		{
			printf("%2d ", arr[i][j]);
		}
		printf("\n");

	}
	printf("\n");

	return 0;
}